package com.stackexchange.webapis.enums
{
	import com.nodename.utils.Enumeration;

	/**
	 * Enum class for the Comment postType property
	 **/
	public class PostType
	{
		Enumeration.registerClass(PostType);
		
		[Enum] public static const QUESTION:PostType = _();
		[Enum] public static const ANSWER:PostType = _();
		
		protected static const LOCK:Object = {};
		private static function _():PostType
		{
			return new PostType(LOCK);
		}
		
		public function PostType(lock:Object)
		{
			if (lock != LOCK)
			{
				throw new Error("illegal contructor access");
			}
		}
		
		public function toString():String
		{
			return Enumeration.nameOf(this);
		}
	}
}